<template>
  <div>
    <!--搜索模块-->
    <searchCard @handleSearch="handleSearch" @handleReset="handleReset">
      <el-form ref="queryForm" :inline="true" :model="listQuery" size="small" label-width="80px">
        <el-row :gutter="20">
          <el-col :span="6">
            <el-form-item label="状态状态" prop="status">
              <findDictionary v-model="listQuery.status" type-code="TransferLog_Status" />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="用户平台内唯一码:" prop="unionId">
              <el-input v-model="listQuery.unionId" placeholder="请输入"/>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </searchCard>

  </div>
</template>

<script>
import { bus } from '../../../../../../bus'

export default {
  name: 'Query',
  props: {
    // bus 前缀
    busNamePrefix: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      // 用来查询数据列表得参数
      listQuery: {
        pageNumber: 1,
        status: ''
      }
    }
  },

  methods: {
    // 搜索按钮
    handleSearch() {
      bus.$emit(`${this.busNamePrefix}Query`, this.listQuery)
    },

    // 重置按钮
    handleReset() {
      this.$refs['queryForm'].resetFields()
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>
